<template>
    <div id="Home">
        <div class="common-layout">
            <el-container class="container">
                <el-aside>
                    <Aside />
                </el-aside>
                <el-container>
                    <el-header class="header">
                        <Header />
                    </el-header>
                    <div class="tags hidden-xs-only">
                        <Tags />
                    </div>
                    <el-main class="module-view">
                        <router-view v-slot="{ Component }">
                            <keep-alive>
                                <component
                                    :is="Component"
                                    :key="route.path"
                                    v-if="route.meta.keep"
                                />
                            </keep-alive>
                            <component :is="Component" v-if="!route.meta.keep" />
                        </router-view>
                    </el-main>
                </el-container>
            </el-container>
        </div>
    </div>
</template>

<script setup>
import Aside from '@/components/Aside.vue'
import Header from '@/components/Header.vue'
import Tags from '@/components/MenuTags.vue';
import { useRoute } from 'vue-router';
const route = useRoute()

</script>

<style lang='less' >
#Home {
    width: 100%;
    background-color: var(--bgColor1);
    .el-aside {
        // 宽度不可设置为0
        --el-aside-width: 1;
    }
    .common-layout {
        height: 100%;
        .container {
            height: 100%;
            .header {
                background-color: var(--bgColor1);
                // box-shadow: 2px 2px 6px 0px rgba(0, 0, 0, 0.2);
            }
            .module-view {
                display: flex;
                justify-content: center;
                padding: 0;
            }
        }
    }
}
@media screen and(max-width:768px) {
    .module-view {
        margin-top: 5px !important;
    }
}
</style>
